//
//  AppDelegate.h
//  Shinow_IHealthMember
//
//  Created by YT on 2017/11/15.
//  Copyright © 2017年 YT. All rights reserved.

#import "BaseView.h"

@implementation BaseView

/** 返回view是否是约束布局模式 */
+ (BOOL)requiresConstraintBasedLayout{
    return YES;
}

/** View里面通过响应者直接调用ViewController*/
- (BaseViewController *)viewController {
    UIResponder *nextResponder = self;
    do {
        nextResponder = [nextResponder nextResponder];
        if ([nextResponder isKindOfClass:[UIViewController class]]) {
            return (BaseViewController *)nextResponder;
        }
    } while (nextResponder != nil);
    
    return nil;
}


@end
